//
//  LocationCell.m
//  LawyerAssistant
//
//  Created by 戴伟 on 2018/11/8.
//  Copyright © 2018年 戴伟. All rights reserved.
//

#import "LocationCell.h"
#import <AMapSearchKit/AMapSearchKit.h>


@interface LocationCell ()

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *subtitleLabel;

@end

@implementation LocationCell

- (void)awakeFromNib {
    [super awakeFromNib];
}

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    static NSString *ID = @"LocationCell";
    LocationCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[[NSBundle mainBundle] loadNibNamed:@"LocationCell" owner:self options:nil] lastObject];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
        cell.tintColor = THEMECOLOR;
    }
    return cell;
}


-(void)setLocation:(AMapPOI *)location{
    _titleLabel.text = location.name;
    _subtitleLabel.text = location.address;
}

@end
